package com.taven.javaagent.loader;


import java.lang.instrument.ClassFileTransformer;
import java.security.ProtectionDomain;

public class TransformerLoader implements ClassFileTransformer {

    private final String className;

    public TransformerLoader(String className) {
        this.className = className;
    }

    public String getClassName() {
        return className;
    }

    @Override
    public byte[] transform(ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) {
        System.out.println("transform-className：" + className);

        return classfileBuffer;
    }


}